from Cube.game import ObjectPoolRelease

class QMapMgr:
    def __init__(self):
        self.CurrentMapHeader = None
        self.CurrentMapBody = None

    # override it
    def CmdSyncPeriodGet(self):
        period = 0.1
        return period

    # override it
    def PreludeFrameGet(self):
        return None

    # override it
    def NextMapHeaderLoad(self):
        return False

    def MapBodyLoad(self):
        # Load Map Body in MapBodyController
        mapBodyKlass = self.CurrentMapHeader.MapBodyKlassGet()
        self.CurrentMapBody = mapBodyKlass(self.CurrentMapHeader)
        return self.CurrentMapBody

    # override it
    def IntermezzoFrameGet(self):
        return None

    # override it
    def FinaleFrameGet(self):
        return None

    # override it
    def destroy(self):
        ObjectPoolRelease()
